home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Moscow ML 1.31 / source code / mosml / src / mosmllib / test / auxil.sml < prev    next >
Encoding:
Text File  |  1996-07-03  |  428 b   |  17 lines  |  [TEXT/R*ch]

  1. (* test/auxil.sml -- Auxiliary functions for test cases *)
  2.  
  3. infix 1 seq
  4. fun e1 seq e2 = e2;
  5. fun say s = (output(std_out, s); flush_out std_out);
  6. fun check b = if b then "OK" else "WRONG";
  7. fun check' f = (if f () then "OK" else "WRONG") handle _ => "EXN";
  8.  
  9. fun range (from, to) p = 
  10.     let open Integer 
  11.     in
  12.     (from > to) orelse (p from) andalso (range (from+1, to) p)
  13.     end;
  14.  
  15. fun checkrange bounds = check o range bounds;
  16.  
  17.